]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionSystem: Use logError to record extension errors with stack trace
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 2 Sep 2019 12:01:36 +0000 (14:01 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 9 Sep 2019 19:28:19 +0000 (19:28 +0000)
Extensions might emit JS errors explicitly or implicitly, however GNOME
Shell doesn't present any stack trace for those making them quite hard
to debug.

Make this easier by logging errors with logError() whichs includes the
stack dump.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/700

js/ui/extensionSystem.js

index fd7196972d6d31fb27b6328b0bf9901e3eaecce9..a668907f75b87d79269501fa71bd2d3e4d1ba64e 100644 (file)
@@ -194,7 +194,7 @@ var ExtensionManager = class {
             extension.errors = [];
         extension.errors.push(message);
 
-        log('Extension "%s" had error: %s'.format(uuid, message));
+        logError(error, `Extension ${uuid}`);
         this.emit('extension-state-changed', extension);
     }